<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/jsp/common/include/taglibs.jsp"%>
<script type="text/javascript">
// $(document).ready(function(){
// 	if(""!="${msg}"){
// 		alert("${msg}");
// 	}
	
// });
//예약페이지로 이동
function goReserrvation(p_id,me,r_date,pg_no){
	
// 	if($(me).html().indexOf("예약대기")>-1 || $(me).html().indexOf("예약완료")>-1){
// 		return false;
// 	}
	<c:if test="${'N'==pensionInfo.reservation_yn}">
	alert("예약은 전화로만 가능합니다");
	return false;
	</c:if>
	
// 	alert(pg_no);
// 	return false;
	location.href="./petc1002Q.do?p_id="+p_id+"&reservation_dt="+r_date+"&pg_no="+pg_no;
}

function goNextMonth(nextNum){
	
// 	${fn:substring(reservation_dt,0,4)}년 ${fn:substring(reservation_dt,4,6)}월
	var nDt = new Date();
	nDt.set({year:${fn:substring(reservation_dt,0,4)},month:(Number(${fn:substring(reservation_dt,4,6)})-1),day:Number(${fn:substring(reservation_dt,6,8)})});
	nDt.addMonths(nextNum);
// 	alert(nDt.toString("yyyyMMdd"));
	location.href="./petc1001Q.do?p_id=${param.p_id}&reservation_dt="+nDt.toString("yyyyMMdd");
}
</script>

			<p>해달 날짜, 객실명에 마우스를 올리면 상세 설명을 볼수 있습니다</p>
			<p><img src="/camping/img/icon_green.jpg" /> 예약가능, <img src="/camping/img/icon_red.jpg" /> 예약완료</p>
			<table style="width: 100%">
				<tr>
					<td colspan="7" style="text-align: center;">
						<div>
							<a href="#" onclick="goNextMonth(-1);"><img alt="" src="/camping/img/calendar_arrow_l.jpg"  style="vertical-align:top; padding-top: 20px;padding-right: 10px;"></a>
							<strong style="font-size: 36px;font-weight: bold;font-family: Arial Black">${fn:substring(reservation_dt,0,4)}년
									${fn:substring(reservation_dt,4,6)}월</strong>
							<a href="#" onclick="goNextMonth(1);"><img alt="" src="/camping/img/calendar_arrow_r.jpg" style="vertical-align:top; padding-top: 20px;padding-left : 10px;"></a>
						</div>
						<div style="padding-left: 0px;float: right;"><strong style="color: #ff9f52; ">TODAY : ${nDtAll }</strong></div>
						
						
					</td>
				</tr>
			</table>
			<table class="cal1">
				<tr>
					<th class="calRed">일요일</th>
					<th class="calBlack">월요일</th>
					<th class="calBlack">화요일</th>
					<th class="calBlack">수요일</th>
					<th class="calBlack">목요일</th>
					<th class="calBlack">금요일</th>
					<th class="calBlue">토요일</th>
				</tr>
				${txtCal }
			</table>

<table width="100%" border="0" cellspacing="0" cellpadding="0">
	<tr>
		<td height="3" bgcolor="#86ad29"></td>
	</tr>
	<tr>
		<td style="padding-top: 2px;"><%@ include
				file="/WEB-INF/jsp/usr/pe/re/footer.jsp"%></td>
	</tr>
</table>